package com.seari.custody.bean;

import lombok.*;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Optional;

@Builder(toBuilder = true)
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Valid
public class OutlineProjectData {
    //等级

    private String level;
    //调节等级
    private Integer adjustLevel;
    //项目id
    @NotNull(message = "项目id不可为空")
    private String projectId;
    //项目类型
    @NotNull
    private String projectType;
    //项目子类型
    private String projectSubType;
    //线路
    @NotNull(message = "路线类型不可为空")
    private String lineType;
    //车站
    @NotNull(message = "车站类型不可为空")
    private String stationFlag;
    //区间
    @NotNull(message = "区间类型不可为空")
    private String stationArea;
    //h为基坑挖深
    private Double h;
    //d∥为基坑与地铁设施（当为高架时，桥梁投影外边线）水平向最小净距
    private Double dHorizontal;
    //D为隧道直径
    private Double d;
    //F为地铁设施覆土厚度
    private Double f;
    //d⊥为竖向最小净距
    private Double dVertical;
    //S为基坑开挖面积
    private Double s;
    //上覆宽度
    private Double aboveCoverWidth;
    //Φ为盾构或管线直径
    private Double diameter;
    //离高架桥墩距离
    private Double dBridge;
    //标高变化
    private Double elevationChanges;
    //桩基与地铁结构的距离(m)
    private Double pileDisFromSubWayStr;

    public String getDisTunnelGtDiameter() {
        return disTunnelGtDiameter;
    }

    public void setDisTunnelGtDiameter(String disTunnelGtDiameter) {
        this.disTunnelGtDiameter = disTunnelGtDiameter;
    }

    //离隧道距离大于Φ
    private String disTunnelGtDiameter;

    //平行顶进
    private String parallelForward;
    //距离隧道30m内
    private String dis30FromTunnel;
    //距离高架投影线10m范围
    private String shadowBridge10;
    //正上方路面简单铣刨加罩
    private String aboveSimpleCover;
    //是否绿化项目
    private Integer greenProject;

    //正上方开挖
    private String aboveDig;
    //上穿下穿
    private String isUnderCross;

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getParallelForward() {
        return parallelForward;
    }

    public void setParallelForward(String parallelForward) {
        this.parallelForward = parallelForward;
    }

    public Double getH() {
        return h;
    }

    public void setH(Double h) {
        this.h = h;
    }

    public Double getDHorizontal() {
        return dHorizontal;
    }

    public void setDHorizontal(Double dHorizontal) {
        this.dHorizontal = dHorizontal;
    }

    public Double getD() {
        return d;
    }

    public void setD(Double d) {
        this.d = d;
    }

    public Double getF() {
        return f;
    }

    public void setF(Double f) {
        this.f = f;
    }

    public Double getDVertical() {
        return dVertical;
    }

    public void setDVertical(Double dVertical) {
        this.dVertical = dVertical;
    }

    public Double getS() {
        return s;
    }

    public void setS(Double s) {
        this.s = s;
    }

    public Double getAboveCoverWidth() {
        return aboveCoverWidth;
    }

    public void setAboveCoverWidth(Double aboveCoverWidth) {
        this.aboveCoverWidth = aboveCoverWidth;
    }

    public Double getDiameter() {
        return diameter;
    }

    public void setDiameter(Double diameter) {
        this.diameter = diameter;
    }

    public Double getDBridge() {
        return dBridge;
    }

    public void setDBridge(Double dBridge) {
        this.dBridge = dBridge;
    }

    public Double getElevationChanges() {
        return elevationChanges;
    }

    public void setElevationChanges(Double elevationChanges) {
        this.elevationChanges = elevationChanges;
    }

    public Double getPileDisFromSubWayStr() {
        return pileDisFromSubWayStr;
    }

    public void setPileDisFromSubWayStr(Double pileDisFromSubWayStr) {
        this.pileDisFromSubWayStr = pileDisFromSubWayStr;
    }

    public String getDis30FromTunnel() {
        return dis30FromTunnel;
    }

    public void setDis30FromTunnel(String dis30FromTunnel) {
        this.dis30FromTunnel = dis30FromTunnel;
    }

    public Boolean getShadowBridge10() {
        return "y".equalsIgnoreCase(Optional.ofNullable(shadowBridge10).orElse("").trim());
    }

    public void setShadowBridge10(String shadowBridge10) {
        this.shadowBridge10 = shadowBridge10;
    }

    public String getAboveSimpleCover() {
        return aboveSimpleCover;
    }

    public void setAboveSimpleCover(String aboveSimpleCover) {
        this.aboveSimpleCover = aboveSimpleCover;
    }

    public Integer getGreenProject() {
        return greenProject;
    }

    public void setGreenProject(Integer greenProject) {
        this.greenProject = greenProject;
    }

    public Boolean getAboveDig() {
        return "y".equalsIgnoreCase(Optional.ofNullable(aboveDig).orElse("").trim());
    }

    public void setAboveDig(String aboveDig) {
        this.aboveDig = aboveDig;
    }

    public Integer getIsUnderCross() {

        String trim = Optional.ofNullable(isUnderCross).orElse("").trim();
        switch (trim) {
            case "sc":
                return 1;

            case "xc":
                return 2;

            default:
                return 0;

        }


    }

    public void setIsUnderCross(String isUnderCross) {
        this.isUnderCross = isUnderCross;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectType() {
        return projectType;
    }

    public void setProjectType(String projectType) {
        this.projectType = projectType;
    }

    public String getProjectSubType() {
        return projectSubType;
    }

    public void setProjectSubType(String projectSubType) {
        this.projectSubType = projectSubType;
    }

    public String getLineType() {
        return lineType;
    }

    public void setLineType(String lineType) {
        this.lineType = lineType;
    }

    public String getStationFlag() {
        return stationFlag;
    }

    public void setStationFlag(String stationFlag) {
        this.stationFlag = stationFlag;
    }

    public String getStationArea() {
        return stationArea;
    }

    public void setStationArea(String stationArea) {
        this.stationArea = stationArea;
    }

    public Integer getAdjustLevel() {
        return adjustLevel;
    }

    public void setAdjustLevel(Integer adjustLevel) {
        this.adjustLevel = adjustLevel;
    }
}
